<!--
 * @Description: 收款账号设置
 * @version: 电子名片2.0
 * @Author: 付小清
 * @Date: 2020-11-23 10:24:08
 * @LastEditors: 付小清
 * @LastEditTime: 2020-12-16 10:19:03
-->

<template>
  <div class="form-box">
    <el-form ref="refForm" :size="size" label-width="120px" :model="formData" :validate-on-rule-change="false">
      <el-form-item label="支付宝账号">
        <el-input v-model="formData.alipay" disabled />
      </el-form-item>
      <el-form-item disabled label="微信账号">
        <el-input v-model="formData.wechat" disabled />
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
// 接口
import { userSet } from '@/api/basics'
export default {
  data() {
    return {
      formData: {
        alipay: 'wxe52e721dc70c795b',
        wechat: 'wxe52e721dc70c795b'
      }
    }
  },
  computed: {
    size() {
      return this.$store.getters.size
    }
  },
  mounted() {

  },
  methods: {
    getShroff() {
      try {
        this.$refs.refForm.validate((valid) => {
          if (valid) {
            userSet(this.formData).then(res => {
              if (res.code === 0) {
                this.$message.success(res.data)
              }
            })
          } else {
            console.log('error submit!!')
          }
        })
      } catch (e) {
        console.log(e)
      }
    }

  }
}
</script>

<style lang="scss" scoped>
</style>
